home *** CD-ROM | disk | FTP | other *** search
- /*
- CEntryList.h
-
- History:
- Tue, 18 Jul 1995 AJR Created.
- */
-
- #pragma once
-
- #include "CListBox.h"
- #include "CList.h"
-
- class CEntry;
- class CLookupDocument;
-
- // ------------------------------------------------------------
- // CLASS CEntryListBox
-
- class CEntryList : public CListBox, public LListener
- {
- public:
- enum {
- kEmptySelection = -1
- };
-
- static void Register();
-
- void SetLookupDocument(CLookupDocument *);
-
- UInt16 InsertRow(UInt16 row, UInt16 count = 1);
- void DeleteRow(Uint16 row, UInt16 count = 1);
-
- void SetSelection(UInt16 row, Boolean select = true);
- Int16 GetSelection() const;
-
- void InvalidateRow(UInt16 row);
-
- virtual Boolean ObeyCommand(CommandT inCommand, void * ioParam = nil);
- virtual void FindCommandStatus(CommandT inCommand, Boolean & outEnabled,
- Boolean & outUsesMark, Char16 & outMark, Str255 outName);
-
- virtual void ListenToMessage(MessageT inMessage, void * ioParam);
-
- private:
- CLookupDocument * mDocument;
-
- CEntryList(LStream * inStream);
-
- virtual void FinishCreateSelf();
-
- virtual void LDEFInitialize();
- virtual void LDEFDraw( Boolean lSelect, Rect *lRect, Cell lCell,
- short lDataOffset, short lDataLen );
- virtual void LDEFHilite( Boolean lSelect, Rect *lRect, Cell lCell,
- short lDataOffset, short lDataLen );
-
- const CEntry & GetEntryAt(Cell cell) const;
-
- UInt16 GetRowCount() const;
-
- enum {
- kClassID = 'RECL'
- };
- static CEntryList * CreateFromStream(LStream * inStream);
- };
-
-